<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
<%@ page import="com.yaodian100.core.common.utils.ServerValue" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ include file="/taglibs.jsp" %>

<c-rt:set var="midContextPath" value='<%=ServerValue.getMidContextPath()%>' />

<h1>礼品卡管理 - 检视明细</h1>

<div class="f-link">
	<a href="${midContextPath}/giftcard/viewAmount.do?mainId=${giftcardAmount.mainId}">回礼品卡主档</a>
	<a href="${midContextPath}/giftcard/list.do">回礼品卡查询</a>
</div>
<br />
<br />
&nbsp;
<table class="tb-data" width="100%">
	<tr>
		<th width="25%">礼品卡批号</th>
		<td>
			${giftcardMain.mainId}
		</td>
	</tr>
	<tr>
		<th>礼品卡名称</th>
		<td>
			${giftcardMain.giftcardName}
		</td>
	</tr>
	<tr>
		<th>充值期限</th>
		<td>
			<fmt:formatDate value="${giftcardMain.rechargeDeadline}" pattern="yyyy-MM-dd HH:mm:ss" />
		</td>
	</tr>
	<tr>
		<th>申请人</th>
		<td>
			${giftcardMain.applyUser}
		</td>
	</tr>
	<tr>
		<th>申请日期</th>
		<td>
			<fmt:formatDate value="${giftcardMain.applyDate}" pattern="yyyy-MM-dd HH:mm:ss" />
		</td>
	</tr>
	<tr>
		<th>状态</th>
		<td>
			${giftcardQueryStatusMenu.options[giftcardAmount.status].name}
		</td>
	</tr>
	<tr>
		<th>建立人</th>
		<td>
			${giftcardMain.createUser}
		</td>
	</tr>
	<tr>
		<th>建立时间</th>
		<td>
			<fmt:formatDate value="${giftcardMain.createDate}" pattern="yyyy-MM-dd HH:mm:ss" />
		</td>
	</tr>
	<tr>
		<th>修改人</th>
		<td>
			${giftcardMain.modifyUser}
		</td>
	</tr>
	<tr>
		<th>修改时间</th>
		<td>
			<fmt:formatDate value="${giftcardMain.modifyDate}" pattern="yyyy-MM-dd HH:mm:ss" />
		</td>
	</tr>
	<tr>
		<th>面额</th>
		<td>
			${giftcardAmount.amount}
		</td>
	</tr>
	
	<tr>
		<th>数量</th>
		<td>
			${giftcardAmount.count}
		</td>
	</tr>
</table>

<br />
<br />
<br />
<yaodian100:pageutil pagerObj="${pager}" link="viewItem.do"/>	
	<table width="100%">
		<thead class="tb-1">
			<tr>
				<th>卡号</th>
				<th>密码</th>
				<th>状态</th>
				<th>入库日期</th>
				<th>领用日期</th>
				<th>领用批号</th>
				<th>充值期限</th>
				<th>充值日期</th>
				<th>充值状态</th>
			</tr>
		</thead>
		<tbody class="tb-1">
			<c:forEach items="${giftcardItems}" var="giftcardItem" varStatus="rows_index">
				<tr class="${rows_index.count % 2 == 0 ? 'bg-yl' : ''}">
					<td>${fn:substring(giftcardItem.cardCode,0,2)}-${fn:substring(giftcardItem.cardCode,2,6)}-${fn:substring(giftcardItem.cardCode,6,10)}-${giftcardItem.cardCheckCode}</td>
					<td>${fn:substring(giftcardItem.cardPassword,0,5)}***</td>
					<td>
					<c-rt:choose>
						<c-rt:when test="${giftcardItem.status=='00'}">
							申请中
						</c-rt:when>
						<c-rt:when test="${giftcardItem.status=='50'}">
							已入库
						</c-rt:when>
						<c-rt:when test="${giftcardItem.status=='60'}">
							已领用
						</c-rt:when>
						<c-rt:when test="${giftcardItem.status=='70'}">
							已核可
						</c-rt:when>
						<c-rt:when test="${giftcardItem.status=='90'}">
							已作废
						</c-rt:when>
					</c-rt:choose>
					</td>
					<td><fmt:formatDate value="${giftcardItem.warehouseDate}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
					<td><fmt:formatDate value="${giftcardItem.receiveDate}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
					<td>${giftcardItem.receiveId}</td>
					<td><fmt:formatDate value="${giftcardItem.rechargeDeadline}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
					<td><fmt:formatDate value="${giftcardItem.rechargeDate}" pattern="yyyy-MM-dd HH:mm:ss" /></td>
					<td>
					<c-rt:choose>
						<c-rt:when test="${giftcardItem.rechargeStatus=='0'}">
							未充值
						</c-rt:when>
						<c-rt:when test="${giftcardItem.rechargeStatus=='1'}">
							已充值
						</c-rt:when>
					</c-rt:choose>
					</td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
<yaodian100:pageutil pagerObj="${pager}" link="viewItem.do"/>
<br />